package com.itheima.mm.controller;

import com.itheima.mm.entity.Result;
import com.itheima.mm.pojo.Dict;
import com.itheima.mm.service.DictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController()
@RequestMapping("/dict")
public class
DictController {
    @Autowired
    private DictService dictService;


    @GetMapping("/findListByType")
    public Result findListByType(@RequestParam("typeId") Integer typeId){
        List<Dict> listByType = dictService.findListByType(typeId);
        return new Result(true,"获取学科列表成功",listByType);
    }
}
